import {url,axios} from '.';

export const getCarousels = async (params) => {
    let res = await axios({
        method: 'get',
        url: `${url}/carousels`,
        params
    });
    return res.data;

}

export const addCarousel = async (contentIds) => {
    let res = await axios({
        method: 'post',
        url: `${url}/carousels`,
        data:{
            contentIds
        }
    });
    return res.data;

}
export const updateCarouselIndex = async (id,val) => {
    let res = await axios({
        method: 'put',
        url: `${url}/carousels/index/${id}`,
        data:{
            val
        }
    });
    return res.data;

}
export const deleteCarousel = async (id) => {
    let res = await axios({
        method: 'delete',
        url: `${url}/carousels/${id}`
    });
    return res.data;

}